<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="*|/"><xsl:apply-templates/></xsl:template>

<xsl:template match="text()|@*"><xsl:value-of select="."/></xsl:template>

<xsl:template match='nbsp' name='nbsp'>
<xsl:text disable-output-escaping='yes'>&amp;nbsp;</xsl:text>
</xsl:template>

<xsl:template match="usersList">
<!-- Insert appropriate Validation -->
<script>
<xsl:comment><![CDATA[
function validateForm() {
	document.returnValue = true;
	email = document.getElementById("EMAIL").value;
	if( email.length > 0 )
		if( isEmail(email) ){
			alert("Inserisci un email address valido, dai!");
			document.returnValue = false;
		}
	var nick = document.getElementById("NICK").value;
	if( nick.length > 0 )
		isUsername(nick);
	if( !(nick.length > 0) && !(email.length > 0) ){
		alert("Inserisci o l'indirizzo email o lo username, dai!");
		document.returnValue = false;
	}
}
]]></xsl:comment>
</script>
<!-- End of Insert appropriate Validation -->

	<table border="1" cellspacing="0" cellpadding="2" class="body" width="100%">
	<tr><td colspan="3" align="center">Forum: <b><xsl:value-of select="@forumtitle"/></b> (<xsl:value-of select="@total"/> utenti)</td></tr>
	<xsl:for-each select="user">
	</xsl:for-each>
	<tr>
		<form name="addUser2Forum" method="post" action="{@baseUrl}forumManage.aspx?forumid={@forumid}" onSubmit="validateForm();return document.returnValue">
		<td colspan="3" bgcolor="#EEEEEE">
			<table border="0" class="body">
			<tr><td >Email:</td><td>
				<input type="text" id="EMAIL" name="EMAIL" size="35" maxlength="64"></input>
			</td></tr>
			<tr><td ></td><td>
				<span class="body_10px_red">Se e' un tuo amico che non e' registrato lo puoi invitare solo per email.</span>
			</td></tr>
			<tr><td >Username:</td><td>
				<input type="text" ID="NICK" name="NICK" size="20" maxlength="20"></input>
			</td></tr>
			<tr><td ></td><td>
				<span class="body_10px_red">Se sai che e' gia iscritto meglio invitarlo con lo username.</span>
			</td></tr>
			<tr><td colspan="2" align="center">
				<br/><input type="submit" name="SB{@ID}" value="Aggiungilo subito!"></input>
				<input type="hidden" name="actiontype" value="2"></input>
				<input type="hidden" name="forumid" value="{@forumid}"></input>
			</td></tr>
			</table>
		</td>
		</form>
	</tr>
	<tr><td colspan="3" align="center"><b><xsl:value-of select="@WARNING"/></b></td></tr>
	</table>
</xsl:template>


</xsl:stylesheet>